﻿<!--
    Copyright (c) 2013 Nokia Corporation.
-->

<phone:PhoneApplicationPage 
    x:Class="Dradis.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
    xmlns:src="clr-namespace:Dradis"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        
        <maps:Map
            x:Name="MyMap"
            Center="61.501644, 23.7615471"
            ZoomLevel="7"
            CartographicMode="Aerial"
            Width="Auto"
            Height="Auto"
            Opacity="0.8"
            ZoomLevelChanged="OnMapZoomLevelChanged"
            />
        
        <Image
            x:Name="MyLocationMarker"
            Source="/Graphics/center-marker-grey-48.png"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            />

        <TextBlock
            x:Name="TweetTextBlock"
            Margin="10, 5, 10, 0"
            VerticalAlignment="Top"
            TextWrapping="Wrap"
            Foreground="LightBlue"
            FontWeight="Bold"
            />
        
        <Image
            x:Name="RetroDisplayOverlayImage"
            Width="480"
            Height="800"
            Opacity="0.5"
            />

        <ProgressBar
            x:Name="CommonProgressBar"
            Height="10"
            Margin="0,0,0,748"
            IsIndeterminate="True"
            Visibility="Collapsed"
            />
        
        <!--Location panel is shown at application startup 
            asking for permission to location data.-->
        <Grid x:Name="LocationPanel" Margin="0, 0, 0, 0" Grid.RowSpan="2" Background="#333333" Opacity="0.8">
            <StackPanel Grid.Row="1" Margin="12, 62, 12, 0">
                <TextBlock Margin="12, 0, 12, 0" Text="{Binding Path=LocalizedResources.LocationUsageQueryText, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextTitle2Style}" TextWrapping="Wrap"/>
                <TextBlock Margin="12, 10, 12, 0" Text="{Binding Path=LocalizedResources.LocationUsageInfoText, Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}" TextWrapping="Wrap"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
                <Button x:Name="AllowButton" Content="{Binding Path=LocalizedResources.AllowButtonText, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Left" Width="200" Click="LocationUsage_Click"/>
                <Button x:Name="CancelButton" Content="{Binding Path=LocalizedResources.CancelButtonText, Source={StaticResource LocalizedStrings}}" HorizontalAlignment="Right" Width="200" Click="LocationUsage_Click"/>
            </StackPanel>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>